<template>
  <a-config-provider :locale="locale" :update-at-scroll="true">
    <router-view></router-view>
  </a-config-provider>
    <a-back-top target-container="#app" />

</template>

<script setup lang="ts">
import { computed } from "vue";
import enUS from "@arco-design/web-vue/es/locale/lang/en-us";
import zhCN from "@arco-design/web-vue/es/locale/lang/zh-cn";
import useLocale from "./hooks/locale";
// useI18n()
const { currentLocale } = useLocale();
const locale = computed(() => {
  switch (currentLocale.value) {
    case "zh-CN":
      return zhCN;
    case "en-US":
      return enUS;
    default:
      return enUS;
  }
});
</script>

<style scoped>

</style>
